﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using System.IO;

public class BuildAssetBundles :Editor
{

    [MenuItem("Tools/Build AssetBundles")]
    public static void BuildAssets()
    {
        var path = Application.streamingAssetsPath;

        if (!Directory.Exists(path))
        {
            Directory.CreateDirectory(path);
        }
       
        BuildPipeline.BuildAssetBundles(path, BuildAssetBundleOptions.ChunkBasedCompression, BuildTarget.StandaloneWindows64);
    }
}
